home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 94 / CD-ROM 94.iso / util / weban / setup.msi / Cabs.w19.cab / copyreportlist.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2002-02-11  |  1.2 KB  |  39 lines

  1. <?xml version="1.0"?> 
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4.     <xsl:variable name="Assessment">
  5.       <c score="1" text="Unable to Scan"/>
  6.       <c score="2" text="Severe Risk"/>
  7.       <c score="3" text="Potential Risk"/>
  8.       <c score="4" text="Security FYIs"/>
  9.       <c score="5" text="Strong Security"/>
  10.     </xsl:variable>
  11.     <xsl:template match="/">
  12.         <table border="0" cellpadding="0" cellspacing="0" width="100%">
  13.             <tr class="ReportListHeader">
  14.                 <td><B>Computer Name</B></td>
  15.                 <td><B>IP Address</B></td>
  16.                 <td><B>Assessment</B></td>
  17.                 <td><B>Scan Date</B></td>
  18.             </tr>
  19.             <xsl:for-each select="Reports">
  20.                 <xsl:apply-templates>
  21.                     <xsl:sort order="sortorder" select="sortfield"/>
  22.                 </xsl:apply-templates>
  23.             </xsl:for-each>
  24.         </table>
  25.     </xsl:template>
  26.     
  27.     <xsl:template match="Report">
  28.         <xsl:param name="score" select="@grade"/>
  29.     
  30.         <tr>
  31.             <td><xsl:value-of select="@computer"/></td>
  32.             <td><xsl:value-of select="@ip"/></td>
  33.             <td><xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$score]/@text"/></td>
  34.             <td><xsl:value-of select="@date"/></td>
  35.         </tr>
  36.         
  37.     </xsl:template>
  38.     
  39. </xsl:stylesheet>